import { createApp } from 'vue';
import './style.scss';
import 'element-plus/es/components/message/style/css'; // element-plus message样式
import 'element-plus/es/components/notification/style/css'; // element-plus notification样式
import 'element-plus/theme-chalk/dark/css-vars.css'; // element-plus dark主题
import App from './App.vue';
import { useRegisterSW } from 'virtual:pwa-register/vue';
import Particles from '@tsparticles/vue3';
import { loadFull } from 'tsparticles';
import router from '@/router';
import { createPinia } from 'pinia';
import 'virtual:svg-icons-register';
import './utils/versionUpdateInit';
import { i18n } from '@/utils/i18n';
import './utils/g4.js'; // 注入geetest4 sdk 行为验证
useRegisterSW();
import { imageCache } from '@/utils/directive';
const app = createApp(App);
app.use(i18n);
app.use(createPinia());
app.use(router);
app.use(Particles, {
    init: async (engine) => {
        await loadFull(engine);
    },
});
app.directive('image-cache', imageCache); // 图片缓存指令
app.mount('#app');
